home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 27 (1992-03)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip
/
MegaDisc 27 (1992-03)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf
/
Programming
/
Integer_Math
/
IntMath.Doc
/
IntMath.Doc
Wrap
Text File
|
1992-03-30
|
3KB
|
93 lines
INTEGER MATH ROUTINES
All code and documentation (C) 1992 by Peter Thompson.
(( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 ))
This distribution is numbered 1 (one) and is dated 26th Jan. 1992
How?
~~~~
These routines are "wareware";
1) Use at your own risk (beware the fruminous semantic error!).
2) If you do use them, send me a copy of the program you use them in.
3) You may freely redistribute the source under the following conditions;
a) *Nothing* is altered in or omitted from the code or documentation;
b) Copyright remains solely mine.
4) You may charge a fee for passing on this code, but you may not prevent
anyone else from charging any other fee for performing that same service.
(Translation : you can sell this code, but you can't stop anyone else
selling it for less (or even giving it away (or even paying other people
to take it (unlikely as that may seem)))).
What?
~~~~~
The routines in this drawer can be divided into four classes;
a) 32 bit integer math (Int32.i)
Just your standard 32 bit multiply, square, signed & unsigned divide
routines. Caveat: no overflow detection.
b) 64 bit integer math (Int64.i)
Just your standard 64 bit multiply, square, signed & unsigned divide
routines. Caveat: no overflow detection.
c) 32<->64 bit math (LongInts.i)
These routines are intended for use with 32-bit fixed point arithmetic.
They produce 64 bit results which can then be shifted and truncated to
produce 32-bit results.
d) 64<->128 bit math (LongInts.i)
Much the same as for the 32<->64, except read "64" for "32", and "128"
for "64".
For further information, consult the routines themselves.
Why?
~~~~
Because I wanted to. I have been toying with the idea of writing (yet
another) Mandelbrot/Julia generator for a while now; an idea made more
realistic by my recent registration for DICE (matt Dillon's Integrated C
Environment - see review this issue) for the magnificent sum of US$50.
However, in the interim, too many other generators have come out; so,
rather than waste the sustained burst of inspiration that lead to the
creation of these routines, I decided to send the creations of my hands
forth into an appreciative world.
What next?
~~~~~~~~~~
* 68020/030/040 support. These processors have 32x32->64 bit multiply
instructions, thus allowing shorter and faster code. Due: when I can
afford a A3000UX with an 040 card ;-).
* Unlimited length math routines. Due: when I feel like it.
* 128x128->256 bit routines... Due: when I have nothing better to do.
* Fix-point routines (math, input, output). Due: sometime mid 1992.
* C glue routines. Due: Whenever I can be bothered. Probably when I next
run out of stuff to send to MegaDisc.
Where?
~~~~~~
Peter Thompson
33 Pleasant Street
Pascoe Vale 3044
AUSTRALIA
(( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 )) (( 27 ))